Optimal. Leaf size=58 \[ \frac {4 \sqrt {a+a \sin (c+d x)}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3400, 3377,
2718} \begin {gather*} \frac {4 \sqrt {a \sin (c+d x)+a}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right ) \sqrt {a \sin (c+d x)+a}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3400
Rubi steps
\begin {align*} \int x \sqrt {a+a \sin (c+d x)} \, dx &=\left (\csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int x \sin \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx\\ &=-\frac {2 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}+\frac {\left (2 \csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int \cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx}{d}\\ &=\frac {4 \sqrt {a+a \sin (c+d x)}}{d^2}-\frac {2 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 76, normalized size = 1.31 \begin {gather*} -\frac {2 \left ((-2+d x) \cos \left (\frac {1}{2} (c+d x)\right )-(2+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {a (1+\sin (c+d x))}}{d^2 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.04, size = 93, normalized size = 1.60
method | result | size |
risch | \(-\frac {i \sqrt {2}\, \sqrt {-a \left (-2-2 \sin \left (d x +c \right )\right )}\, \left (-i d x +d x \,{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-2\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-1\right ) d^{2}}\) | \(93\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.52, size = 69, normalized size = 1.19 \begin {gather*} -2 \, \sqrt {2} {\left (\frac {x \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{4} \, \pi - \frac {1}{2} \, d x - \frac {1}{2} \, c\right )}{d} - \frac {2 \, \cos \left (\frac {1}{4} \, \pi - \frac {1}{2} \, d x - \frac {1}{2} \, c\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d^{2}}\right )} \sqrt {a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 47, normalized size = 0.81 \begin {gather*} \frac {2\,\sqrt {a\,\left (\sin \left (c+d\,x\right )+1\right )}\,\left (2\,\sin \left (c+d\,x\right )-d\,x\,\cos \left (c+d\,x\right )+2\right )}{d^2\,\left (\sin \left (c+d\,x\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________